use criterion::{black_box, criterion_group, criterion_main, Criterion};
use solution5::odd_fibnacci_sum;

pub fn criterion_benchmark(c: &mut Criterion) {
    c.bench_function("fib our 4", |b| b.iter(|| odd_fibnacci_sum(black_box(4))));
    c.bench_function("fib our 16", |b| b.iter(|| odd_fibnacci_sum(black_box(16))));
    c.bench_function("fib our 32", |b| b.iter(|| odd_fibnacci_sum(black_box(32))));
    c.bench_function("fib our 0xFFFFFF", |b| {
        b.iter(|| odd_fibnacci_sum(black_box(0xFFFFFF)))
    });
    c.bench_function("fib our 0x7FFFFFFF", |b| {
        b.iter(|| odd_fibnacci_sum(black_box(0x7FFFFFFF)))
    });
}

criterion_group!(benches, criterion_benchmark);
criterion_main!(benches);
